<?php

namespace module\index\validate;

use app\Validate;

class Pay extends Validate
{
    /**
    * 所有验证场景需要的字段.
    *
    * @var array<array>
    */
   protected $scene = [
       'save' => ['amount', 'memo'],
       'index' => ['page', 'pageSize'],
    ];
   /**
    * Get the validation rules that apply to the request.
    *
    * @var array<string>
    */
   protected $rule = [
       'amount' => 'require',  // 金额
       'memo' => 'requireWithout:id|max:60',  // 备注
       'page' => 'integer|>:0',
       'pageSize' => 'integer|>:0',
  ];
   /**
    * 验证字段描述
    * 
    * @var array<string>
    */
   protected $field = [
       'amount' => '身份证号码',  // 金额
       'memo' => '真实姓名',  // 备注
       'page' => '页码',
       'pageSize' => '分页大小',
  ];
}
